/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class MilkWarmer {
    static categoryCode = '010050059';

    static categoryName = '暖奶器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return MilkWarmer.categoryCode;
    }

    get categoryName() {
        return MilkWarmer.categoryName;
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pDrhg19d',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pGoxpNjA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'pZgRrvTC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkStatus(params) {
        return command({
            method: 'getWorkStatus',
            methodId: 'p1vZQkmr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAX3iew',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTemperature(params) {
        return command({
            method: 'setTemperature',
            methodId: 'peH3by7P',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default MilkWarmer;
